package org.ichamigua.user.service;

import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.service.IService;
import org.ichihamigua.common.framework.entity.Result;
import org.ichihamigua.common.user.dto.UpdateAvatarLogDto;
import org.ichihamigua.common.user.dto.UpdateNicknameDto;
import org.ichihamigua.common.user.dto.UpdateUsernameDto;
import org.ichihamigua.common.user.entity.UserEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author zzy
 */
public interface UserService extends IService<UserEntity> {


    Result<?> updateAvatar(Long userId, MultipartFile file);

    UserEntity getOne(Long userId, List<SFunction<UserEntity, ?>> columns);

    UserEntity getOne(Long userId);

    Result<?> updateUsername(Long userId, UpdateUsernameDto dto);

    Result<?> updateNickname(Long userId, UpdateNicknameDto dto);

    Result<?> updateBeforeAvatar(Long userId, UpdateAvatarLogDto dto);


}
